Optimal. Leaf size=294 \[ \frac {2 a^2 \left (15 c^2+10 c d+7 d^2\right ) \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x)}{315 d^2 f \sqrt {a+a \sin (e+f x)}}+\frac {4 a (5 c-d) \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{315 d f}+\frac {2 \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{105 f}+\frac {2 a^2 (3 B c-9 A d-10 B d) \cos (e+f x) (c+d \sin (e+f x))^3}{63 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a B \cos (e+f x) \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^3}{9 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.47, antiderivative size = 294, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.135, Rules used = {3055, 3060,
2840, 2830, 2725} \begin {gather*} \frac {2 a^2 \left (15 c^2+10 c d+7 d^2\right ) \left (3 A d (c-13 d)-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x)}{315 d^2 f \sqrt {a \sin (e+f x)+a}}+\frac {2 a^2 (-9 A d+3 B c-10 B d) \cos (e+f x) (c+d \sin (e+f x))^3}{63 d^2 f \sqrt {a \sin (e+f x)+a}}+\frac {2 \left (3 A d (c-13 d)-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) (a \sin (e+f x)+a)^{3/2}}{105 f}+\frac {4 a (5 c-d) \left (3 A d (c-13 d)-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) \sqrt {a \sin (e+f x)+a}}{315 d f}-\frac {2 a B \cos (e+f x) \sqrt {a \sin (e+f x)+a} (c+d \sin (e+f x))^3}{9 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2725
Rule 2830
Rule 2840
Rule 3055
Rule 3060
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^{3/2} (A+B \sin (e+f x)) (c+d \sin (e+f x))^2 \, dx &=-\frac {2 a B \cos (e+f x) \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^3}{9 d f}+\frac {2 \int \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^2 \left (\frac {1}{2} a (9 A d+B (c+6 d))-\frac {1}{2} a (3 B c-9 A d-10 B d) \sin (e+f x)\right ) \, dx}{9 d}\\ &=\frac {2 a^2 (3 B c-9 A d-10 B d) \cos (e+f x) (c+d \sin (e+f x))^3}{63 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a B \cos (e+f x) \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^3}{9 d f}-\frac {\left (a \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right )\right ) \int \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^2 \, dx}{21 d^2}\\ &=\frac {2 \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{105 f}+\frac {2 a^2 (3 B c-9 A d-10 B d) \cos (e+f x) (c+d \sin (e+f x))^3}{63 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a B \cos (e+f x) \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^3}{9 d f}-\frac {\left (2 \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right )\right ) \int \sqrt {a+a \sin (e+f x)} \left (\frac {1}{2} a \left (5 c^2+3 d^2\right )+a (5 c-d) d \sin (e+f x)\right ) \, dx}{105 d^2}\\ &=\frac {4 a (5 c-d) \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{315 d f}+\frac {2 \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{105 f}+\frac {2 a^2 (3 B c-9 A d-10 B d) \cos (e+f x) (c+d \sin (e+f x))^3}{63 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a B \cos (e+f x) \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^3}{9 d f}-\frac {\left (a \left (15 c^2+10 c d+7 d^2\right ) \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right )\right ) \int \sqrt {a+a \sin (e+f x)} \, dx}{315 d^2}\\ &=\frac {2 a^2 \left (15 c^2+10 c d+7 d^2\right ) \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x)}{315 d^2 f \sqrt {a+a \sin (e+f x)}}+\frac {4 a (5 c-d) \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{315 d f}+\frac {2 \left (3 A (c-13 d) d-B \left (c^2-7 c d+34 d^2\right )\right ) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{105 f}+\frac {2 a^2 (3 B c-9 A d-10 B d) \cos (e+f x) (c+d \sin (e+f x))^3}{63 d^2 f \sqrt {a+a \sin (e+f x)}}-\frac {2 a B \cos (e+f x) \sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^3}{9 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.49, size = 267, normalized size = 0.91 \begin {gather*} -\frac {a \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {a (1+\sin (e+f x))} \left (4200 A c^2+3276 B c^2+6552 A c d+5928 B c d+2964 A d^2+2689 B d^2-4 \left (9 A d (14 c+13 d)+B \left (63 c^2+234 c d+137 d^2\right )\right ) \cos (2 (e+f x))+35 B d^2 \cos (4 (e+f x))+840 A c^2 \sin (e+f x)+1512 B c^2 \sin (e+f x)+3024 A c d \sin (e+f x)+3036 B c d \sin (e+f x)+1518 A d^2 \sin (e+f x)+1598 B d^2 \sin (e+f x)-180 B c d \sin (3 (e+f x))-90 A d^2 \sin (3 (e+f x))-170 B d^2 \sin (3 (e+f x))\right )}{1260 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 5.36, size = 207, normalized size = 0.70
method | result | size |
default | \(\frac {2 \left (1+\sin \left (f x +e \right )\right ) a^{2} \left (\sin \left (f x +e \right )-1\right ) \left (\left (-45 A \,d^{2}-90 B c d -85 B \,d^{2}\right ) \sin \left (f x +e \right ) \left (\cos ^{2}\left (f x +e \right )\right )+\left (105 A \,c^{2}+378 A c d +201 A \,d^{2}+189 B \,c^{2}+402 B c d +221 B \,d^{2}\right ) \sin \left (f x +e \right )+35 B \left (\cos ^{4}\left (f x +e \right )\right ) d^{2}+\left (-126 A c d -117 A \,d^{2}-63 B \,c^{2}-234 B c d -172 B \,d^{2}\right ) \left (\cos ^{2}\left (f x +e \right )\right )+525 A \,c^{2}+882 A c d +429 A \,d^{2}+441 B \,c^{2}+858 B c d +409 B \,d^{2}\right )}{315 \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(207\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 443, normalized size = 1.51 \begin {gather*} -\frac {2 \, {\left (35 \, B a d^{2} \cos \left (f x + e\right )^{5} - 5 \, {\left (18 \, B a c d + {\left (9 \, A + 10 \, B\right )} a d^{2}\right )} \cos \left (f x + e\right )^{4} + 84 \, {\left (5 \, A + 3 \, B\right )} a c^{2} + 24 \, {\left (21 \, A + 19 \, B\right )} a c d + 4 \, {\left (57 \, A + 47 \, B\right )} a d^{2} - {\left (63 \, B a c^{2} + 18 \, {\left (7 \, A + 13 \, B\right )} a c d + {\left (117 \, A + 172 \, B\right )} a d^{2}\right )} \cos \left (f x + e\right )^{3} + {\left (21 \, {\left (5 \, A + 6 \, B\right )} a c^{2} + 6 \, {\left (42 \, A + 43 \, B\right )} a c d + {\left (129 \, A + 134 \, B\right )} a d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (21 \, {\left (25 \, A + 21 \, B\right )} a c^{2} + 6 \, {\left (147 \, A + 143 \, B\right )} a c d + {\left (429 \, A + 409 \, B\right )} a d^{2}\right )} \cos \left (f x + e\right ) - {\left (35 \, B a d^{2} \cos \left (f x + e\right )^{4} + 84 \, {\left (5 \, A + 3 \, B\right )} a c^{2} + 24 \, {\left (21 \, A + 19 \, B\right )} a c d + 4 \, {\left (57 \, A + 47 \, B\right )} a d^{2} + 5 \, {\left (18 \, B a c d + {\left (9 \, A + 17 \, B\right )} a d^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left (21 \, B a c^{2} + 6 \, {\left (7 \, A + 8 \, B\right )} a c d + {\left (24 \, A + 29 \, B\right )} a d^{2}\right )} \cos \left (f x + e\right )^{2} - {\left (21 \, {\left (5 \, A + 9 \, B\right )} a c^{2} + 6 \, {\left (63 \, A + 67 \, B\right )} a c d + {\left (201 \, A + 221 \, B\right )} a d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{315 \, {\left (f \cos \left (f x + e\right ) + f \sin \left (f x + e\right ) + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}} \left (A + B \sin {\left (e + f x \right )}\right ) \left (c + d \sin {\left (e + f x \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.67, size = 523, normalized size = 1.78 \begin {gather*} \frac {\sqrt {2} {\left (35 \, B a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {9}{4} \, \pi + \frac {9}{2} \, f x + \frac {9}{2} \, e\right ) + 630 \, {\left (12 \, A a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 8 \, B a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 16 \, A a c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 14 \, B a c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 7 \, A a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 6 \, B a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 210 \, {\left (4 \, A a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 6 \, B a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 12 \, A a c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 10 \, B a c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 5 \, A a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 5 \, B a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sin \left (-\frac {3}{4} \, \pi + \frac {3}{2} \, f x + \frac {3}{2} \, e\right ) + 126 \, {\left (2 \, B a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 4 \, A a c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 6 \, B a c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, A a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, B a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sin \left (-\frac {5}{4} \, \pi + \frac {5}{2} \, f x + \frac {5}{2} \, e\right ) + 45 \, {\left (4 \, B a c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 2 \, A a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, B a d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sin \left (-\frac {7}{4} \, \pi + \frac {7}{2} \, f x + \frac {7}{2} \, e\right )\right )} \sqrt {a}}{2520 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2}\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________